<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="/WEB-INF/jsp/base/taglibs.jsp"%>
<%@include file="/WEB-INF/jsp/base/head.jsp"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>新闻列表</title>
</head>
<body>
	<s:form namespace="/news" action="newsAction!getNews" method="post"
		id="form1">
		<input type="hidden" id="addURL" value="newsAction!getNewsAdd.do" />
		<input type="hidden" id="delURL" value="newsAction!newsDelete.do" />
		<input type="hidden" id="editURL" value="newsAction!getNewsEdit.do" />
		<div class="center_main">
			<div id="btn-option"
				style="padding-left: 10px; margin: 0px; float: none;">
				<a class="add-btn" id="add" href="javascript:void(0);" title="新增">新增</a>
				<a class="edit-btn" id="edit" href="javascript:void(0);" title="修改">修改</a>
				<a class="del-btn" id="delete" href="javascript:void(0);" title="删除">删除</a>
			</div>
			<div class="center_left"></div>
		</div>
		<div id="page-top">
			<span>新闻列表</span> <b></b><i></i>
		</div>
		<div id="page">
			<div id="search">
				<div class="search-edit-wapper">
					<label for="">标题：</label> <input type="text" class="inputText"
						name="newsbean.title" value="${newsbean.title}" />
				</div>
				<div class="search-edit-wapper">
					<label for="">分类：</label>
					<s:select list="sortlist" id="codes" listKey="id" listValue="name"
						name="sortbean.id" headerKey="" headerValue="所有"></s:select>
				</div>
			</div>
			<div id="search-btn-wapper">
				<s:submit cssClass="btn" method="getNews" id="btnEnter" value="查询"></s:submit>
			</div>
			<div id="item-list">
				<table>
					<thead>
						<tr>
							<th>选择<input type="checkbox" id="selectAll" /></th>
							<th>编号</th>
							<th>标题</th>
							<th>分类</th>
							<th>作者</th>
							<th>录入人</th>
							<th>属性</th>
							<th>更新时间</th>
						</tr>
					</thead>
					<tbody>
						<s:iterator value="newslist" status="n">
							<tr>
								<td><input type="checkbox" class="classCheckbox"
									name="newslist[${n.index}].id" value="${id}" /></td>
								<td>${id}</td>
								<td><s:if test='prefix!=null && prefix!="" '> [${prefix}]</s:if>${title}</td>
								<td>
									<c:forEach items="${sortlist }" var="s">
										<s:if test="s.id==type">${s.name}</s:if>//TODO
									</c:forEach>
								</td>
								<td>${createdName}</td>
								<td>${createdUser}</td>
								<td>${property}</td>
								<td><fmt:formatDate value="${modifiedDate}"
										pattern="yyyy-MM-dd HH:mm:ss" /></td>
							</tr>
						</s:iterator>
						<s:if test="newslist == null || newslist.size == 0">
							<tr>
								<td colspan="8"><span class="spanRB">数据暂无!</span></td>
							</tr>
						</s:if>
					</tbody>
				</table>
			</div>
		</div>
	</s:form>
	<div id="page-bottom">
		<b></b><i></i>
		<d:page namespace="/news" action="newsAction!getNews">
		</d:page>
	</div>
</body>
</html>